@extends('admin.base.parent')
@section('content')
				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>

						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
								<a href="#">主页</a>
							</li>

							<li>
								<a href="#">商品详情</a>
							</li>
							<li class="active">商品操作页</li>
						</ul><!-- .breadcrumb -->
						@if(session('msg'))
				        	<div class="alert alert-success alert-icon">
							{{ session('msg') }}
							<i class="icon"></i>
							</div>
				        @endif
				        @if(session('error'))
				        	<div class="alert alert-warning alert-icon">
							{{ session('error') }}
							<i class="icon"></i>
							</div>
						@endif

						<div class="nav-search" id="nav-search">
							<form action='{{ url("admin/album") }}' method='post' name='myform'>
				        		{{ csrf_field() }}
				        		{{ method_field('DELETE') }}
				        	</form>
							<form class="form-search" action='{{ url("admin/flink") }}' method='get'>
								<span class="input-icon">
									<input type="text" placeholder="查找"  name='webname' class="nav-search-input" id="nav-search-input" autocomplete="off" />
									<button type="submit" class="btn btn-purple btn-sm">
										查找
									<i class="icon-search icon-on-right bigger-110"></i>
									</button>
								</span>
							</form>
						</div><!-- #nav-search -->
					</div>

					<div class="page-content">
						<div class="page-header">
							<h1>
								友情链接管理
								<small>
									<i class="icon-double-angle-right"></i>
									友情链接
								</small>
							</h1>
						</div><!-- /.page-header -->

						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->

								<div class="row">
									<div class="col-xs-12">
										<div class="table-responsive">
											<table id="sample-table-1" class="table table-striped table-bordered table-hover">
												<thead>
													<tr>
														<th class="center">
															<label>
																<input type="checkbox" class="ace" />
																<span class="lbl"></span>
															</label>
														</th>
														<th>ID</th>
														<th>链接名称</th>
														<th>
															链接url
														</th>
														<th>
															链接网站联系人
														</th>
														<th>
															链接网站描述
														</th>
														<th>
															加入时间
														</th>
														<th>
															显示方式
														</th>
														<th>
															邮箱
														</th>
														<th>
															图片显示
														</th>
														<th>修改/删除</th>
													</tr>
												</thead>

												<tbody>
													 @foreach($list as $v)
													<tr>
														<td class="center">
															<label>
																<input type="checkbox" class="ace" />
																<span class="lbl"></span>
															</label>
														</td>
												
														<td>
															{{ $v->id }}
														</td>
														<td>
															{{ $v->webname }}
														</td>
														
														<td>
															{{ $v->url }}
														</td>
														
														<td>
															{{ $v->rname }}
														</td>

														<td>
															{{ $v->msg }}
														</td>
														
														<td>
															{{ date('Y-m-d H:i:s',$v->dtime) }}
														</td>

														<td>
															@if($v->list == 1)显示网站名称
															@else($v->list == 2)显示网站logo
															@endif 
														</td>

														<td>
															{{ $v->email }}	
														</td>

														<td>
															<img src="{{ url('admin/upload/'.$v->logo) }}"style="width:70px;height='100px'">
														</td>

														<td>
															<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">

																 
																	<a class="icon-edit bigger-120 btn btn-xs btn-info" href="{{ url('admin/flink').'/'.$v->id }}/edit">修改</a>
																

																
																	<a class="icon-trash bigger-120 btn btn-xs btn-danger" href='javascript:doDel({{ $v->id }})'>删除</a>

																
															</div>

															<div class="visible-xs visible-sm hidden-md hidden-lg">
																<div class="inline position-relative">
																	<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown">
																		<i class="icon-cog icon-only bigger-110"></i>
																	</button>
																		
																	<ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
																		<li>
																			<a href="#" class="tooltip-info" data-rel="tooltip" title="View">
																				<span class="blue">
																					<i class="icon-zoom-in bigger-120"></i>
																				</span>
																			</a>
																		</li>

																		<li>
																			<a href="#" class="tooltip-success" data-rel="tooltip" title="Edit">
																				<span class="green">
																					<i class="icon-edit bigger-120"></i>
																				</span>
																			</a>
																		</li>

																		<li>
																			<a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
																				<span class="red">
																					<i class="icon-trash bigger-120"></i>
																				</span>
																			</a>
																		</li>
																	</ul>
																</div>
															</div>
														</td>
													</tr>
												@endforeach
												</tbody>
											</table>
											{{ $list->appends($where)->links() }}
										</div><!-- /.table-responsive -->
									</div><!-- /span -->
								</div><!-- /row -->

								<div class="hr hr-18 dotted hr-double"></div>



								<div id="modal-table" class="modal fade" tabindex="-1">
									<div class="modal-dialog">
										<div class="modal-content">
											<div class="modal-header no-padding">
												<div class="table-header">
													<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
														<span class="white">&times;</span>
													</button>
													Results for "Latest Registered Domains
												</div>
											</div>
										</div><!-- /.modal-content -->
									</div><!-- /.modal-dialog -->
								</div><!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->
				<script type="text/javascript">
			        function doDel(id){
			        	if(confirm('确定删除吗？')){
			        		var form = document.myform;
			        		form.action = '/admin/flink/'+id;
			        		form.submit();
			        	}
			        }
			    </script>

@endsection